clear all;
clc;

load 7nneigs;
load mnist_test;
load mnist_train;

numV = 100;
xa = 94;
xb = 93;
figname = '7-8-100';

X = [xL,xU];
n = size(X,2);
step  = floor(n/numV);

VV = V(1:step:n,:);
VX = X(:,1:step:n);

VisualizeDigits(VV(:,xa),VV(:,xb),VX);
set(gcf, 'PaperPosition', [0 0 10 7]); %Position plot at left hand corner with width 5 and height 5.
set(gcf, 'PaperSize', [10 7]); %Set the paper to have width 5 and height 5.
saveas(gcf, [figname '.pdf'], 'pdf') %Save figure